Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optimism: use op-alloy TxDeposit #10667

Merged
merged 14 commits into from
Sep 5, 2024
Merged

Conversation

tcoratger
Copy link
Contributor

@tcoratger tcoratger commented Sep 2, 2024

@joshieDo joshieDo added C-debt Refactor of code section that is hard to understand or maintain A-op-reth Related to Optimism and op-reth labels Sep 3, 2024
@mattsse
Copy link
Collaborator

mattsse commented Sep 4, 2024

new op-alloy patch out

@tcoratger tcoratger marked this pull request as ready for review September 4, 2024 15:10
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

last questions

pending @klkvr

crates/storage/codecs/src/alloy/transaction/mod.rs Outdated Show resolved Hide resolved
Comment on lines 24 to 25
#[cfg(feature = "optimism")]
use op_alloy_consensus as _;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I missed something with the imports but otherwise it triggers the unused_crate_dependencies clippy (maybe a false positive). I have the impression that since op_alloy_consensus is only used in a submodule under the optimism cfg, it creates this weird warning...

However I thought I did things right in the Cargo.toml with an optional and a dep only for the optimism cfg..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Imo this is similar to what we have here

use op_alloy_rpc_types as _;

Comment on lines 66 to 67
#[cfg(feature = "optimism")]
use reth_codecs as _;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this now necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same reason...

value: self.value,
gas_limit: self.gas_limit as u64,
is_system_transaction: self.is_system_transaction,
input: self.input.clone(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattsse currently all Compact impls for alloy transactions clone input during encoding. should we address this with a helper struct?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine because this is Bytes and should be cheap enough

Copy link
Collaborator

@klkvr klkvr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, pending @mattsse nits

@mattsse mattsse added this pull request to the merge queue Sep 5, 2024
Merged via the queue into paradigmxyz:main with commit b0fddef Sep 5, 2024
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-op-reth Related to Optimism and op-reth C-debt Refactor of code section that is hard to understand or maintain
Projects
None yet
Development

Successfully merging this pull request may close these issues.

use alloy transaction types
4 participants